Silk Mobile

Table of Contents (Homepage)

Manually Instrumenting Android Applications

This process is optional. You should use this process only if, for reasons of security, you wish to retain the signature of the application.

General Background

Silk Mobile comes with a unique capability, to automatically control your application internal (Native Object identification) without changing the APK of the application under test. However, because the automatic process uses a public key to resign the application, at times, due to security considerations, it will be inappropriate for performing instrumentation and the private key will be needed.

To accommodate such needs, we provide a command line tool that can be used when the application's original APK is built (usually by the build/R&D team).

This tool receives as input the original APK together with its signing information (keystore, storepass, keypass, alias). The tool generates a bundled zip file containing the original, unmodified APK and an additional APK that has been signed with the same keystore file.

This bundled zip file can then be imported into the Silk Mobile using the Application Manager's Import command.

Following are the steps you should follow to make your application automation ready:

Process

In the root directory of the Silk Mobile installation you will find the instrument.exe file.

To run this executable, use the following syntax

instrument.exe <applicationApk> <keystore> <storepass> <keypass> <alias> <bundleFile> <jarsigner>

  • <applicationApk> - The path to the target application"s APK file.

  • <keystore> - The keystore file used to sign the APK.

  • <storepass> - The keystore password.

  • <keypass> - The used key password.

  • <alias> - The alias used by the keystore

  • <bundleFile> - The path and filename of the bundled zip file to be generated. Following its generation, be sure to provide your QA team with this file.

The <jarsigner> parameter is obsolete. The tool ignores this variable and uses internal signer instead.

images/download/attachments/2688119/1.jpg


The bundle.zip crated should contain two apk files and one properties file.

Optional: Manual Instrumentation With Brute Force

Editing the (manfiset.xml) to fix issues with the application such as:

  • Add internet permissions

  • Make the application "de-buggable"

From the command line, the command to use is:

<Installation folder>\insturument.exe -fix <location of original application> <Out APK location> [-c]

For example:

<Installation folder>\insturument.exe -fix "C:\\TEMP\Original.apk" "C:\\TEMP\Out.apk"